package com.yt.ch03.annotation;

import java.lang.reflect.Method;


public class StuAshowTest {
	public static void main(String[] args) {
		Student student=new Student();
		Class stu=student.getClass();
		Method [] methods=stu.getMethods();
		for(Method method:methods){
			AShow a=method.getAnnotation(AShow.class);
			if(a!=null){
				System.out.print(method.getName()+"的注解值为:");
				System.out.println(a.value());
				if(a.value()){
					System.out.println("值为true");
				}else{
					System.out.println("值为false");
				}
			}
		}
	}
}
